﻿using System.Collections.Generic;
using System.Data;
using MaLu.Data;
using System;

namespace MaLu.BusiLogic
{
    public class BLFarmerShare
    {
        public static DataSet FaGetFarmerShareCollection(IDbProvider provider, int year)
       {
           List<IDataParameter> paraList = new List<IDataParameter>();
           paraList.Add(SqlHelper.Instance.CreateParameter("@Year", DataType.Int32, 8, year));


           DataSet ds = SqlHelper.Instance.ExecuteProcedure(provider, "Proc_FaGetFarmerShareCollection", paraList.ToArray());
           return ds;
       }

        public static DataTable FaGetFarmerShareDetail(IDbProvider provider, int year,string village)
       {
           List<IDataParameter> paraList = new List<IDataParameter>();
           paraList.Add(SqlHelper.Instance.CreateParameter("@Year", DataType.Int32, 8, year));
           paraList.Add(SqlHelper.Instance.CreateParameter("@Village", DataType.VarChar, 50, village));

           DataSet ds = SqlHelper.Instance.ExecuteProcedure(provider, "Proc_FaGetFarmerShareDetail", paraList.ToArray());
           return ds.Tables[0];
       }

    } 
}
